from requests import Response


class BaseException(Exception):
    """Base exception class"""

    pass


class HTTPException(BaseException):
    def __init__(self, response: Response) -> None:
        super().__init__(
            f"A request to the Monstercat API was unsuccessful. "
            + f"The API returned HTTP {response.status_code} {response.reason}."
        )


class BadRequest(HTTPException):
    """Exception for when 400 status code"""

    pass


class Unauthorized(HTTPException):
    """Exception for when 401 status code"""

    pass


class Forbidden(HTTPException):
    """Exception for when 403 status code"""

    pass


class NotFound(HTTPException):
    """Exception for when 404 status code"""

    pass


class IntervalServerError(HTTPException):
    """Exception for when 500 status code"""

    pass


class BadGateway(HTTPException):
    """Exception for when 502 status code"""

    pass


class ServiceUnavalaible(HTTPException):
    """Exception for when 503 status code"""

    pass
